Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Working With Data Sources

CDSequenceNewDataSource

Creates a new data source.

pascal OSErr CDSequenceNewDataSource (
                     ImageSequence seqID,
                     ImageSequenceDataSource *sourceID,
                     OSType sourceType,
                     long sourceInputNumber,
                     Handle dataDescription,
                     void *transferProc,
                     void *refCon);
seqID
The unique sequence identifier that was returned by the DecompressSequenceBegin function.

sourceID
Returns the new data source identifier.

sourceType
A four-character code describing how the input will be used. This code is usually derived from the information returned by the codec. For example, if a mask plane was passed, this field might contain `mask'.

sourceInputNumber
More than one instance of a given source type may exist. The first occurrence should have a source input number of 1, the second a source input number of 2, and so on.

dataDescription
A handle to a data structure describing the input data. For compressed image data, this is just an ImageDescriptionHandle .

transferProc
A routine that allows the application to transform the type of the input data to the kind of data preferred by the codec. The client of the codec passes the source data in the form most convenient for it. If the codec needs the data in another form, it can negotiate with the client or directly with the Image Compression Manager to obtain the required data format.

refCon
Contains a reference constant value to be passed to the transfer procedure.

DISCUSSION

This function returns a sourceID parameter which must be passed to all other functions that reference the source. All data sources are automatically disposed when the sequence they are associated with is disposed.

CDSequenceDisposeDataSource

Disposes of a data source.

pascal OSErr CDSequenceDisposeDataSource (
                     ImageSequenceDataSource sourceID);
sourceID
The data source identifier that was returned by the CDSequenceNewDataSource function.

DISCUSSION

You use this function to dispose of a data source created by the CDSequenceNewDataSource function. All data sources are automatically disposed when the sequence they are associated with is disposed.

CDSequenceSetSourceData

Sets data in a new frame to a specific data source.

pascal OSErr CDSequenceSetSourceData (
                     ImageSequenceDataSource sourceID,
                     void *data,
                     long dataSize);
sourceID
Contains the source identifier of the data source.

data
Points to the data. This pointer must contain a 32-bit clean address. If you use a dereferenced, locked handle, you must call the Memory Manager's StripAddress function before you use that pointer with this parameter.

dataSize
Specifies the size of the data buffer.

DISCUSSION

The CDSequenceSetSourceData function is called to set data in a new frame to a specific source. For example, as a new frame of compressed data arrives at a source, CDSequenceSetSourceData will be called.

CDSequenceChangedSourceData

Notifies the compressor that the image source data has changed.

pascal OSErr CDSequenceChangedSourceData (
                     ImageSequenceDataSource sourceID);
sourceID
Contains the source identifier of the data source.

DISCUSSION

Use the new CDSequenceSetChangedSourceData function to indicate that the image has changed but the data pointer to that image has not changed. For example, if the data pointer points to the base address of a PixMap, the image in the PixMap can change, but the data pointer remains constant.


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |